import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    redirect: "/home"
  },
  {
    path: '/home',
    name: 'home',
    component: () => import('../views/home.vue'),
    redirect: "/home/list",
    children: [
      {
        path: 'list',
        name: 'list',
        component: () => import('../views/list.vue'),
        meta: {
          title: "商品列表",
          title1: "数据管理"
        }
      }, 
      {
        path: 'shou',
        name: 'shou',
        component: () => import('../views/shou.vue'),
        meta: {
          title1: "首页"
        }
      },
      {
        path: 'user',
        name: 'user',
        component: () => import('../views/user.vue'),
        meta: {
          title: "用户列表",
          title1: "数据管理"
        }
      },
      {
        path: 'about',
        name: 'about',
        component: () => import('../views/about.vue'),
        meta: {
          title: "区域图",
          title1: "图表管理"
        },

      },
      {
        path: 'lo',
        name: 'lo',
        component: () => import('../views/lo.vue'),
        meta: {
          title: "漏斗图",
          title1: "图表管理"
        },

      }
    ]
  }
]
const router = new VueRouter({
  routes
})
export default router